The invention relates to electronic devices, and, more particularly, to circuitry and methods for conversion of sampling rates of digitally sampled data.
Audio systems currently are required to handle data with various sampling rates, from low rates found in many .WAV files such as 8 kHz to high rates of consumer audio equipment such as 48 kHz. Audio is a key feature of PC multimedia with system requirements approaching those of consumer high fidelity systems for a fraction of the cost. For example, the PC 2001 specification sets high quality audio requirements to play out audio streams at 44.1 and 48 kHz rates. A hardware vendor may choose to supply a codec that only supports 48 kHz. In this case, sample rate conversion between 44.1 and 48 kHz is needed.
For rates that are integral multiples of 48 kHz, interpolation between samples to the higher data rate can be accomplished with an FIR filter with a pre-computed set of coefficients for each fixed rate handled by the system. For rates that are not integral multiples of 48 kHz, a direct filter approach to achieve a high quality (98 dB SNR) would require a large set of filter coefficients (more than 10,000 coefficients) plus a large cycle execution. Several methods have been developed which break the filter into a set of smaller taps which interpolate to a common frequency then decimate to the desired frequency.
The most common audio sampling rates are multiples of either 48 kHz or 44.1 kHz. The lowest common multiple rate for conversion from 44.1 kHz to 48 kHz is over 7 MHz. This is an integer ratio of 160 to 147. A possible multi-staged filter would be 2:2:2:2:2:5::3:7:7. This would reduce the coefficients from over 10,000 taps to close to 100 taps. Yet this approach has problems, including an intermediate sampling rate of over 7 MHz and a cycle intensive operation because the filter would be applied on every data sample.
T. Ramstad, Digital Methods for Conversion Between Arbitrary Sampling Frequencies, 32 IEEE Tr.ASSP 577 (1984) presents a general theory of filtering methods for interfacing time-discrete systems with different sampling rates (frequencies). Indeed, Ramstad includes the use of Taylor series coefficients for improved interpolation accuracy, especially in regions where the impulse response varies rapidly.
J. O. Smith, Bandlimited Interpolationxe2x80x94Introduction and Algorithm, CCRMA (1993) details a sampling rate conversion using an oversampled windowed impulse response function with interpolation for the filter coefficients.
Instead of interpolating between filter coefficients and then filtering (as prior methods), the present invention provides sampling rate conversion by filtering the data twice with a table of windowed impulse response samples created with different oversampling rates for different portions of the impulse response and then interpolating between the two results.
This has the advantages of smaller memory use and simple processing while retaining the quality of uniformly sampled impulse response filter coefficient methods.